package com.ruoyi.job.service;

import com.ruoyi.business.service.xxljob.XXLJobHandlerService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class BusinessJobHandler {
    @Resource
    private XXLJobHandlerService xxlJobHandlerService;

    /**
     * koc 用户降级定时任务
     *
     * @throws Exception
     */
    @XxlJob("downKocUserKocLevelHandler")
    public void userKocLevelHandler() throws Exception {
        xxlJobHandlerService.downKocUserKocLevelHandler();
    }


    /**
     * koc 用户升级定时任务
     *
     * @throws Exception
     */
    @XxlJob("upKocUserKocLevelHandler")
    public void upKocUserKocLevelHandler() throws Exception {
        xxlJobHandlerService.upKocUserKocLevelHandler();
    }


    /**
     * koc 3 级内群活跃任务生成 每月1号 生成任务记录
     *
     * @throws Exception
     */
    @XxlJob("inChatGroupTaskSubmitHandler")
    public void inChatGroupTaskSubmitHandler() throws Exception {
        xxlJobHandlerService.inChatGroupTaskSubmitHandler();
    }


}

